﻿
using Microsoft.Web.Infrastructure.DynamicModuleHelper;
using System.Web;
using System.Web.Routing;

[assembly: PreApplicationStartMethod(typeof(MiniProfilerWebFormsEnabler.BootStrapper), "Initialize")]

namespace MiniProfilerWebFormsEnabler
{
    public class BootStrapper
    {
        public static void Initialize()
        {
            //*** register the module
            DynamicModuleUtility.RegisterModule(typeof(MiniProfilerHttpModule));
            //*** setup the route to the handler
            RouteTable.Routes.Add("MiniProfilerWebFormsEnablerRoute", new System.Web.Routing.Route("MiniProfiler/{" + MiniProfilerRouteHandler.ENABLED_KEY + "}", new MiniProfilerRouteHandler()));
            
        }
    }

}
